package com.dyna.cp.mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dyna.cp.mybatis.domain.entity.DemoEduExperience;
import com.dyna.cp.mybatis.domain.entity.DemoUser;
import com.dyna.cp.mybatis.domain.resp.DemoFriendListResp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author LENOVO
* @description 针对表【demo_user】的数据库操作Mapper
* @createDate 2024-07-22 10:04:23
* @Entity com.dyna.mybatis.domain.entity.DemoUser
*/
public interface DemoUserMapper extends BaseMapper<DemoUser> {

    /**
     * 添加用户数据
     * @param demoUser demoUser
     * @return int
     */
    int addUser(DemoUser demoUser);
    int batchSaveUser(@Param("userList") List<DemoUser> userList);

    /**
     * 根据用户名称查询用户信息
     * @param name name
     * @return DemoUser
     */
    List<DemoUser> queryUserByName(@Param("name") String name);

    /**
     * 保存教育经历
     * @param body body
     * @return Boolean
     */
    Boolean saveEduExperience(DemoEduExperience body);

    /**
     * 测试mybatis连表查询集合字段
     * @param id id
     * @return DemoFriendListResp
     */
    DemoFriendListResp testMybatisJoinFriend(@Param("id") Integer id);

    List<DemoFriendListResp> testMybatisJoinFriendPage1();
    List<DemoFriendListResp> testMybatisJoinFriendPage2(@Param("pageSize") Integer pageSize, @Param("pageNum") Integer pageNum);
}




